<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>

<head>
<title>编辑方案</title>
<script type="text/javascript">
$(document).ready(function(){
if('<s:property value="solution.id" />'=='') {
	$('#edit').hide();
}
	$("#editForm").vaildAjax(function(data){
		if(data[1]!=null) {
			BaseJs.alert(data[1]);
		} else {
			BaseJs.alert('操作成功！');
			$('input[name=solution.id]').val(data)
			$('#edit').show();
		}
	});
	
});
	function editContent() {
		var solutionId = $('input[name=solution.id]').val();
		if(solutionId!=''){
			var url=BaseJs.action('solution/EditSolution!toEditContent')+'?solution.id='+solutionId;
			window.open(url);
		}else{
			BaseJs.alert('请先保存编辑方案');
		}
	}
</script>
</head>
<body>
<s:form id="editForm" action="solution/EditSolution" onsubmit="return true">
	<h3>编辑方案信息</h3>
	<s:hidden name="solution.id" />
	<table id="sTable" class="form">
		<tbody>
			<tr>
				<th width="10%">方案名称</th>
				<td width="40%"><s:textfield maxlength="50" name="solution.name"  cssClass="rule[required]"/></td>
				<th width="10%">期号</th>
				<td width="40%"><s:textfield name="solution.issue"  cssClass="rule[required]"/></td>
			</tr>
			<tr>
				<th>出版日期</th>
				<td><m:date name="solution.date"  cssClass="rule[required]" /></td>
				<td></td>
				<td></td>
			</tr>
		</tbody>
	</table>
	<div class="btnGroup"><s:submit id="save" value="保存" /><input id="edit" value="方案内容修改" type="button"
			onclick="editContent();"> </div>
</s:form>
</body>